Carbon


CopyPalette

Header: Palettes.h Carbon status: Supported

Copies entries from one palette to another.

void CopyPalette (
    PaletteHandle srcPalette, 
    PaletteHandle dstPalette, 
    SInt16 srcEntry, 
    SInt16 dstEntry, 
    SInt16 dstLength
);
Parameter descriptions
srcPalette

A handle to the palette from which colors are copied.

dstPalette

A handle to the palette to which colors are copied.

srcEntry

The source palette entry at which copying starts.

dstEntry

The destination palette entry at which copying starts.

dstLength

The number of destination palette entries to change.

DISCUSSION

The CopyPalette function copies entries from the source palette into the destination palette. The copy operation begins at the values specified by the srcEntry and dstEntry parameters, copying into as many entries as are specified by the dstLength parameter. CopyPalette resizes the destination palette when the number of entries after the copy operation is greater than it was before the copy operation.

CopyPalette does not call ActivatePalette, so your application is free to change the palette a number of times without causing a series of intermediate changes to the color environment. Your application should call ActivatePalette after completing all palette changes.

If either of the palette handles is NULL, CopyPalette does nothing.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)